package com.zzyl.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zzyl.base.PageResponse;
import com.zzyl.mapper.CustomerOrdersProjectMapper;
import com.zzyl.service.CustomerOrdersProjectService;
import com.zzyl.vo.NursingServiceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerOrdersProjectServiceImpl implements CustomerOrdersProjectService {
    @Autowired
    private CustomerOrdersProjectMapper customerOrdersProjectMapper;
    @Override
    public PageResponse<NursingServiceVo> getList(String name, Integer pageSize, Integer pageNum, Integer status) {
        PageHelper.startPage(pageNum, pageSize);
        Page<NursingServiceVo> page = customerOrdersProjectMapper.getList(name,status);
        return PageResponse.of(page,NursingServiceVo.class);
    }

    @Override
    public NursingServiceVo getById(Integer id) {
        NursingServiceVo vo = customerOrdersProjectMapper.getById(id);
        return vo;
    }
}
